home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
PPC1B3AA.ZIP
/
UNIX2DOS.PPS
< prev
next >
Wrap
Text File
|
1996-08-29
|
978b
|
38 lines
;----------------------------------------------------------------------------
; Copyright(C) 1996, The AEGiS Corporation
;----------------------------------------------------------------------------
;
; FUNCTION UnixToDos()
;
; Convert a UNIX date (count of seconds since midnight 01/01/70) to a
; DOS date (Date & Time)
;
;----------------------------------------------------------------------------
#lib
#nouser
Declare Procedure UnixToDos(unsigned DateVal, Var Date NewDate, Var Time NewTime)
;----------------------------------------------------------------------------
; UNIX Date&time -> DOSdate&time
;
Procedure UnixToDos(unsigned DateVal, Var Date NewDate, Var Time NewTime)
int tyear
int tday
int thour
int tminute
int tmonth
unsigned tsecond
tsecond = DateVal % 86400
DateVal = DateVal / 86400
tyear = (DateVal / 365)+2
tday = DateVal % 365 - tyear/4
inc tday
NewDate = tday + (tyear+68) * 365 + 17
NewTime = tsecond
EndProc